package top.lidee.common.config;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClient;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 张一恒
 * @version 1.0
 * @description:
 * @date 2024/6/15 3:24
 */
@Configuration
@Data
public class AliyunOSSConfig {
    @Value("${alibaba.access-key}")
    private String key;
    @Value("${alibaba.secret-key}")
    private String secret;
    @Value("${alibaba.oss.endpoint}")
    private String endpoint;
    @Bean
    public OSS OSSClient(){
        return new OSSClient(endpoint,key,secret);
    }
}